package com.study.composite.demo.transparent;

public abstract class CourseComponent {
    protected void addChild(CourseComponent component){
        throw new UnsupportedOperationException("不支持addChild操作");
    }
    protected void removeChild(CourseComponent component){
        throw new UnsupportedOperationException("不支持removeChild操作");
    }
    protected CourseComponent getChild(int index){
        throw new UnsupportedOperationException("不支持getChild操作");
    }
    protected String getName(){
        throw new UnsupportedOperationException("不支持getName操作");
    }
    protected double getPrice(CourseComponent component){
        throw new UnsupportedOperationException("不支持getPrice操作");
    }
    protected void print(){
        throw new UnsupportedOperationException("不支持打印操作");
    }

}
